from app import app, socketio
from flask_cors import CORS


'''
项目运行入口
'''

if __name__ == '__main__':
    # 解决跨域问题
    CORS(app, resources={r"/*": {"origins": "https://localhost:9000"}})

    socketio.run(app, debug=True, port=app.config['PORT'], host='0.0.0.0',
                 use_reloader=False,ssl_context=('ssl/cert.pem', 'ssl/key.pem'))  # use_reloader=False禁用自动重载

    # CORS(app, resources={r"/*": {"origins": "http://localhost:9000"}})
    #
    # socketio.run(app, debug=True, port=app.config['PORT'], host='0.0.0.0',
    #              use_reloader=False)
